package com.eleadmin.damon.controller;

import com.eleadmin.common.core.web.BaseController;
import com.eleadmin.common.core.web.JsonResult;
import com.eleadmin.damon.entity.DataBaseTable;
import com.eleadmin.damon.service.DataBaseService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


/**
 * 报关
 *
 * @author : Doman
 * @version ：1.0
 * @date : 2023-05-06 10:49:33
 */

@Api(tags = "报关")
@RestController
@RequestMapping("/api/damon/database")
public class DataBaseController extends BaseController {

    @Autowired
    private DataBaseService dataBaseService;

    //@ApiOperation("分页查询报关")
    @GetMapping("/dataBase")
    public JsonResult dataBase(DataBaseTable dataBaseTable) throws Exception {
        return dataBaseService.generate(dataBaseTable);
    }


}


//import request from'@/utils/request';
//
//        let databaseParams=reactive({
//        database:'damon_store_test',
//        packages:'store',
//        tableName:'we_warehouse',
//        tableNameJavaEntity:'warehouse',
//        source:'D:/moban/vm/',
//        sourceJava:'main/java/com/eleadmin/',
//        sourceHtml:'main/resources/templates/',
//        openSource:'D\:\\moban\\vm',
//        })
//

//        async function dataBaseFn(params){
//        const res=await request.get('/damon/database/dataBase',{params});
//        if(res.data.code===0&&res.data.data){
//        return res.data.data;
//        }
//        return Promise.reject(new Error(res.data.message));
//        }
//
//
//        document.body.addEventListener('keyup',(e)=>{
//        // console.log(database)
//        if(e.key=='d'){
//        dataBaseFn(databaseParams).then((msg)=>{
//        //  console.log(msg);
//        message.success('生成成功');
//        })
//        }
//        })